package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.JiajiaTransferAccounts;
import com.ruoyi.system.domain.vo.JiajiaTransferAccountsVo;
import com.ruoyi.system.mapper.JiajiaTransferAccountsMapper;
import com.ruoyi.system.service.IJiajiaTransferAccountsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 微信打款Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-25
 */
@Service
public class JiajiaTransferAccountsServiceImpl implements IJiajiaTransferAccountsService 
{
    @Autowired
    private JiajiaTransferAccountsMapper jiajiaTransferAccountsMapper;

    /**
     * 查询微信打款
     * 
     * @param id 微信打款主键
     * @return 微信打款
     */
    @Override
    public JiajiaTransferAccounts selectJiajiaTransferAccountsById(Long id)
    {
        return jiajiaTransferAccountsMapper.selectJiajiaTransferAccountsById(id);
    }

    /**
     * 查询微信打款列表
     * 
     * @param jiajiaTransferAccounts 微信打款
     * @return 微信打款
     */
    @Override
    public List<JiajiaTransferAccountsVo> selectJiajiaTransferAccountsList(JiajiaTransferAccounts jiajiaTransferAccounts)
    {
        return jiajiaTransferAccountsMapper.selectJiajiaTransferAccountsList(jiajiaTransferAccounts);
    }

    /**
     * 新增微信打款
     * 
     * @param jiajiaTransferAccounts 微信打款
     * @return 结果
     */
    @Override
    public int insertJiajiaTransferAccounts(JiajiaTransferAccounts jiajiaTransferAccounts)
    {
        jiajiaTransferAccounts.setCreateTime(DateUtils.getNowDate());
        return jiajiaTransferAccountsMapper.insertJiajiaTransferAccounts(jiajiaTransferAccounts);
    }

    /**
     * 修改微信打款
     * 
     * @param jiajiaTransferAccounts 微信打款
     * @return 结果
     */
    @Override
    public int updateJiajiaTransferAccounts(JiajiaTransferAccounts jiajiaTransferAccounts)
    {
        jiajiaTransferAccounts.setUpdateTime(DateUtils.getNowDate());
        return jiajiaTransferAccountsMapper.updateJiajiaTransferAccounts(jiajiaTransferAccounts);
    }

    /**
     * 批量删除微信打款
     * 
     * @param ids 需要删除的微信打款主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaTransferAccountsByIds(String ids)
    {
        return jiajiaTransferAccountsMapper.deleteJiajiaTransferAccountsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除微信打款信息
     * 
     * @param id 微信打款主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaTransferAccountsById(Long id)
    {
        return jiajiaTransferAccountsMapper.deleteJiajiaTransferAccountsById(id);
    }

    //收益浓缩制
    public void   profitConcentration(){

    }
}
